const state = {
  List: [],
  fields: [], // fields
};
const actions = {
  GetFields({ commit }, data) {
    let fields = [
      {
        title: '序号',
        dataIndex: 'id',
        align: 'center',
        width: 100
      },
      {
        title: 'logo',
        dataIndex: 'user_id.avatar.path',
		scopedSlots: { customRender: 'user_id' },
        align: 'center',
      },
      {
        title: '店铺名称',
        dataIndex: 'user_id.username',
        align: 'center',
      },
	  {
	    title: '联系人',
	    dataIndex: 'name',
	    align: 'center',
	  },
      {
        title: '手机号',
        dataIndex: 'mobile',
        align: 'center',
      },
      {
        title: '入驻主体',
        dataIndex: 'settle_subject',
		scopedSlots: { customRender: 'settle_subject' },
        align: 'center',
      },
      {
        title: '入驻卖场',
        dataIndex: 'market_name',
        align: 'center',
      },
	  {
	    title: '身份证正面',
	    dataIndex: 'id_no_front',
		scopedSlots: { customRender: 'id_no_front' },
	    align: 'center',
	  },
	  {
	    title: '身份证反面',
	    dataIndex: 'id_no_back',
		scopedSlots: { customRender: 'id_no_back' },
	    align: 'center',
	  },
	  {
	    title: '入驻协议',
	    dataIndex: 'settle_agreement',
		scopedSlots: { customRender: 'settle_agreement' },
	    align: 'center',
	  },
	  {
	    title: '状态',
	    dataIndex: 'status',
		scopedSlots: { customRender: 'status' },
	    align: 'center',
	  },
	  {
	    title: '操作',
	    dataIndex: 'action',
		scopedSlots: { customRender: 'action' },
	    align: 'center',
	  }
    ];

    commit('setfields', fields);

  },
};

const mutations = {
  setfields(state, lists) {
    // console.log(state)
    state.fields = lists;
  },
};

export default {
  namespaced: true,
  state,
  actions,
  mutations
};